<?php
/**
 * 
 * @author Todd
 *
 */
class Control_Account_addChannel  extends Control_Account {
	function addChannel() {
		$id 	= MooForm::request('id');
		$prefix = MooForm::request('prefix');
		$name 	= MooForm::request('name');
		$note 	= MooForm::request('note');
		$app_keys = MooForm::request('app_keys');
		
		$addChannel = MooConfig::get('account.addChannel');
		
		$dataArr['id'] 		= $id;
		$dataArr['prefix'] 	= $prefix;
		$dataArr['name'] 	= $name;
		$dataArr['note'] 	= $note;
		$dataArr['app_keys'] = $app_keys;
		$sign = $this->getSign($dataArr);
		
		//　根据 key value 查询到json数据 返回即可
		$url = $addChannel . "&id=" . $id . "&prefix=" .$prefix ."&name=". $name . "&note=" . $note . "&app_keys=" .$app_keys ."&sign=" . $sign;
		$req = MooUtil::curl_send($url);
		
		exit($req);
	}
}